package com.item.controller;

import com.item.entities.CommonResult;
import com.item.entities.User;
import com.item.server.PaymentFeignService;
import org.springframework.web.bind.annotation.RestController;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import javax.annotation.Resource;

/**
 * @autherzzyy
 * @create2020-02-03 14:10
 */
@RestController
public class openFeignController {

    @Resource
    private PaymentFeignService paymentFeignService;

    @GetMapping(value = "/consumer/payment/user/{id}")
    public CommonResult<User> getPaymentById(@PathVariable("id") Long id) {
        return paymentFeignService.getPaymentById(id);
    }

    @GetMapping(value = "/consumer/payment/feign/timeout")
    public String feignTimeout(){
        return paymentFeignService.feignTimeout();
    }
}


        